﻿using System;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using weikebuluo.DAL;
using weikebuluo.Model;
using weikebuluo.Common;

namespace weikebuluo.web.admin.vip
{
    public partial class ordlist : weikeweixin.web.admin.cs.adminbase
    {
        v_ord_dal orddal = new v_ord_dal();
        JsonOperate JsonOperate = new JsonOperate();
        public string url;
        public string url1;
        protected void Page_Load(object sender, EventArgs e)
        {
            url = "http://" + Request.Url.Authority + "/web/wechat/vip/ord.aspx";
            url1 = "http://" + Request.Url.Authority + "/web/wechat/vip/myord.aspx";
            switch (Request.QueryString["action"])
            {
                case "list":
                    list();
                    break;

            }

        }

        /// <summary>
        ///查询
        /// </summary>
        public void list()
        {
            string where = "user_id=" + user_id;
            int Page = int.Parse(Request.Form["page"]);
            int RecordCount = orddal.GetRecordCount(where);
            DataTable dtord = orddal.GetListByPage(where, "ord_id", ((Page - 1) * 15) + 1, (Page - 1) * 15 + 15).Tables[0];
            Response.Write(JsonOperate.GetDataGridJson(dtord, RecordCount));
            Response.End();
        }

    }
}
